import QtQuick 2.4

Item {
    id: item6
    width: 689
    height: 470
    signal pageChanged(int qmlPage)

    Item {
        id: item1
        width: 172
        height: 235
        anchors.top: parent.top
        anchors.topMargin: 0
        anchors.left: parent.left
        anchors.leftMargin: 0

        Image {
            id: image
            x: 26
            y: 8
            width: 100
            height: 100
            anchors.verticalCenter: parent.verticalCenter
            anchors.horizontalCenter: parent.horizontalCenter
            source: "images/back.png"
        }

        Text {
            id: text1
            x: 55
            color: "#ffffff"
            text: qsTr("返回")
            font.family: "微软雅黑"
            font.bold: true
            horizontalAlignment: Text.AlignLeft
            anchors.top: image.bottom
            anchors.topMargin: 0
            anchors.horizontalCenter: parent.horizontalCenter
            font.pixelSize: 20
        }

        MouseArea {
            id: mouseArea
            anchors.fill: parent
        }
        scale: mouseArea.pressed ? 0.9 : 1.0
    }

    Item {
        id: item2
        width: 172
        height: 235
        anchors.top: item8.bottom
        anchors.topMargin: 0
        anchors.left: item9.right
        anchors.leftMargin: 0

        Image {
            id: image1
            x: 17
            y: 8
            width: 100
            height: 100
            anchors.verticalCenter: parent.verticalCenter
            anchors.horizontalCenter: parent.horizontalCenter
            source: "images/power_shutdown.png"
        }

        Text {
            id: text2
            x: 48
            color: "#ffffff"
            text: qsTr("关闭")
            font.family: "微软雅黑"
            font.bold: true
            anchors.top: image1.bottom
            anchors.topMargin: 0
            anchors.horizontalCenter: parent.horizontalCenter
            font.pixelSize: 20
        }

        MouseArea {
            id: mouseArea3
            anchors.fill: parent
        }
        scale: mouseArea3.pressed ? 0.9 : 1.0
    }

    Item {
        id: item3
        width: 172
        anchors.bottom: parent.bottom
        anchors.bottomMargin: 0
        anchors.top: item1.bottom
        anchors.topMargin: 0
        anchors.left: parent.left
        anchors.leftMargin: 0

        Image {
            id: image2
            x: 50
            y: 18
            width: 100
            height: 100
            anchors.verticalCenter: parent.verticalCenter
            anchors.horizontalCenter: parent.horizontalCenter
            source: "images/USB.png"
        }

        Text {
            id: text3
            x: 81
            color: "#ffffff"
            text: qsTr("串口设置")
            font.family: "微软雅黑"
            font.bold: true
            anchors.top: image2.bottom
            anchors.topMargin: 0
            anchors.horizontalCenter: parent.horizontalCenter
            font.pixelSize: 20
        }

        MouseArea {
            id: mouseArea4
            anchors.fill: parent
        }
        scale: mouseArea4.pressed ? 0.9 : 1.0
    }

    Item {
        id: item4
        width: 172
        height: 235
        anchors.top: parent.top
        anchors.topMargin: 0
        anchors.left: item1.right
        anchors.leftMargin: 0

        Image {
            id: image3
            x: 41
            y: 14
            width: 100
            height: 100
            anchors.verticalCenter: parent.verticalCenter
            anchors.horizontalCenter: parent.horizontalCenter
            source: "images/Maintenance_tools.png"
        }

        Text {
            id: text4
            x: 72
            color: "#ffffff"
            text: qsTr("调试打印")
            font.family: "微软雅黑"
            font.bold: true
            anchors.top: image3.bottom
            anchors.topMargin: 0
            anchors.horizontalCenter: parent.horizontalCenter
            font.pixelSize: 20
        }

        MouseArea {
            id: mouseArea1
            anchors.fill: parent
        }
        scale: mouseArea1.pressed ? 0.9 : 1.0
    }

    Item {
        id: item5
        width: 172
        height: 235
        anchors.top: parent.top
        anchors.topMargin: 0
        anchors.left: item4.right
        anchors.leftMargin: 0

        Image {
            id: image4
            x: 50
            y: 18
            width: 100
            height: 100
            anchors.verticalCenter: parent.verticalCenter
            anchors.horizontalCenter: parent.horizontalCenter
            source: "images/icon_maintenance.png"
        }

        Text {
            id: text5
            x: 88
            color: "#ffffff"
            text: qsTr("串口调试")
            font.family: "微软雅黑"
            font.bold: true
            anchors.top: image4.bottom
            anchors.topMargin: 0
            anchors.horizontalCenter: parent.horizontalCenter
            font.pixelSize: 20
        }

        MouseArea {
            id: mouseArea2
            anchors.fill: parent
        }
        scale: mouseArea2.pressed ? 0.9 : 1.0
    }

    Item {
        id: item7
        width: 172
        height: 235
        anchors.left: item3.right
        anchors.leftMargin: 0
        anchors.top: item4.bottom
        anchors.topMargin: 0
    }

    Item {
        id: item8
        width: 172
        height: 235
        anchors.top: parent.top
        anchors.topMargin: 0
        anchors.left: item5.right
        anchors.leftMargin: 0
    }

    Item {
        id: item9
        width: 172
        height: 235
        anchors.top: item5.bottom
        anchors.topMargin: 0
        anchors.left: item7.right
        anchors.leftMargin: 0
    }

    Connections {
        target: mouseArea3
        onPressAndHold: {
            Qt.quit()
        }
    }

    Connections {
        target: mouseArea
        onClicked: item6.pageChanged(0)
    }
}
